CREATE TABLE [dbo].[PODetails]
(
[PODetailId] [bigint] NOT NULL IDENTITY(1, 1),
[POId] [nvarchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[DrugId] [nvarchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[Quantity] [int] NOT NULL,
[RemainQuantity] [int] NOT NULL,
[Remark] [nvarchar] (250) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[PODetails] ADD CONSTRAINT [PK_PODetails] PRIMARY KEY CLUSTERED  ([PODetailId]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[PODetails] ADD CONSTRAINT [FK_PODetails_DrugDispo] FOREIGN KEY ([DrugId]) REFERENCES [dbo].[DrugDispo] ([DrugId])
GO
ALTER TABLE [dbo].[PODetails] ADD CONSTRAINT [FK_PODetails_PO] FOREIGN KEY ([POId]) REFERENCES [dbo].[PO] ([POId])
GO
